import APIClient from "../network/index"
// 砍价状态请求
const classifyModule = {
    state: {
        classifyItems: []
    },
    mutations: {
        getclassify(state, items) {
            state.classifyItems = items;
        }
    },
    actions: {
        getclassify(context) {
            APIClient.getClassify()
                .then(res => {
                    //检测
                    // console.log("分类",res.data.data.data);
                    //赋值
                    context.commit("getclassify", res.data.data.data)
                })
                .catch(error => {
                    console.log(error);
                });
        }
    },
    modules: {

    }
}

export default classifyModule